<template>
  <div class="RoseChartbox">
    <div class="RoseChart">
      <RoseChart
        :data="roseList"
        :color="color"
      />
    </div>
    <div class="RoseCharttext">
      <div v-for="(v, i) in roseList" :key="i">
        <div class="pieText" :style="`border-left: .1875rem solid ${color[i]} `">
          {{ v.x }}
        </div>
        <div class="pieNum">{{ v.y }}</div>
      </div>
    </div>
  </div>
</template>

<script>
import RoseChart from '@/components/chart/pie/RoseChart.vue';
export default {
  components: {
    RoseChart
  },
  props: {
    roseList: {
      typeof: Array,
      default: () => []
    },
    color: {
      typeof: Array,
      default: () => ['#34C8FF', '#00FDFF', '#57FFAA', '#FFD101']
    }
  },
  data() {
    return {
    };
  }
};
</script>

<style lang="scss" scoped>
  .RoseChart{
    width: 8.125rem;
    height: 8.125rem;
    margin-right: 1.125rem;
  }
  .RoseChartbox{
    display: flex;
  }
  .RoseCharttext{
    width: 180px;
    height: 138px;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    display: flex;
    .pieText{
      color: #CDDEEF;
      width: 3.125rem;
      font-size: .75rem;
      margin-bottom: .3125rem;
      margin-right: 15px;
      padding-left: .1875rem;
      height: .625rem;
      line-height: .625rem;
    }
    .pieNum{
      color: #FFFFFF;
      font-size: .75rem;
      padding-left: .1875rem;
    }
  }
</style>
